/*
 * Copyright 2008-2009 ArtisanLogic.com.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.artisanlogic.jingo.parser;

// =====================================================================================================================
// Parser.java                                                                                   Created on Feb 18, 2009
// ---------------------------------------------------------------------------------------------------------------------
/**
 * This interface is a behavior specifications for Jingo module dependency parser implementations.
 * 
 * @author sean@artisanlogic.com
 * @since 0.9-Beta
 */
// =====================================================================================================================
public interface Parser {
  
  // -------------------------------------------------------------------------------------------------------------------
  // public abstract methods
  // -------------------------------------------------------------------------------------------------------------------
	
	/**
	 * This method parses JavaScript source identifying Jingo module declarations, extracting dependencies from the 
	 * encountered declarations and passing them to the provided handler.
	 * 
	 * @param source This parameter holds the JavaScript source to be parsed.
	 * @param handler This parameter holds the Handler instance to be called back into with extracted dependencies.
	 * @param defaultRepo This parameter holds the default repository identifier for this pass of the parser.
	 */
	void parse(String source, Handler handler, String defaultRepo);

}
